package com.clickpaas.governmentcloud.rules.hitech;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class HiTechRules {
	
	public static boolean containHighTechField(List<String> conditionals) {
		boolean result = false;
		List<String> list = new ArrayList<>();
		list.add("电子信息");
		list.add("生物与新医药");
		list.add("航空航天");
		list.add("新材料");
		list.add("高技术服务");
		list.add("新能源与节能");
		list.add("资源与环境");
		list.add("先进制造与自动化");
		List<String> listContains = new ArrayList<>();
		if(conditionals != null && conditionals.size() > 0) {
			listContains = conditionals.stream().filter(item -> list.contains(item)).collect(Collectors.toList());
		}
		if(listContains != null && listContains.size() > 0) {
			result = true;
		}
		return result;
	}
	
	public static boolean containHighTechField3(List<String> conditionals) {
		boolean result = false;
		List<String> list = new ArrayList<>();
		list.add("电子信息");
		list.add("生物与新医药");
		list.add("航空航天");
		list.add("新材料");
		list.add("高技术服务");
		list.add("新能源与节能");
		list.add("资源与环境");
		list.add("先进制造与自动化");
		list.add("科技与产业发展相结合的新模式、新业态");

		List<String> listContains = new ArrayList<>();
		if(conditionals != null && conditionals.size() > 0) {
			listContains = conditionals.stream().filter(item -> list.contains(item)).collect(Collectors.toList());
		}
		if(listContains != null && listContains.size() > 0) {
			result = true;
		}
		return result;
	}

}
